#include <stdio.h>

int main(){
	int a,b,c,count=0;
	for (a=1;a<=50;a++){
		for (b=1;b<=50-a;b++){
			for (c=1;c<=50-a-b;c++){
				if (a*10+b*5+c==100 && a+b+c==50){
					printf("%d %d %d\n", a, b, c);
					count+=1;
				}
			}
		}
	}
	printf("%d", count);
	return 0;
}
